const { Controller } = require("egg");

class UploadCOntroller extends Controller {
  // 获取属性详情（金额及库存）
  async getAttrDetail() {
    const { ctx } = this;
    const { _id } = ctx.query;
    ctx.validate({ _id: {type:"nullValue", fieldName: "_id"} }, ctx.query);
    const data = await ctx.model.Attrdetail.find({ goodsId: _id });
    ctx.send({ msg: "成功", data });
  }
}

module.exports = UploadCOntroller;
